<?php
declare(strict_types=1);
/**
 * Created by project.
 * User: huanzipap
 * Date: 2023/5/11
 * Time: 15:01
 */

namespace App\Model;

use Hyperf\Database\Model\Model;

class ActAnswerRule extends Model
{
    protected ?string $table='act_answer_rule';
    public bool $timestamps = false;

    protected array $fillable = [
        'act_id','extract_type','extract_num','dan_num','duo_num','pan_num',
        'rule','limit_type','limit_time','is_rank'
    ];


    public function getRuleAttribute($value): string
    {
        return $value != null ? htmlspecialchars_decode($value) : '';
    }

    public function setRuleAttribute($value): void
    {
        if($value!='') htmlspecialchars($value);
        $this->attributes['rule'] = $value;
    }



}